home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
asm
/
alib11b.zip
/
CODE1.ZIP
/
CMOS
/
EXAMPLE.ASM
< prev
Wrap
Assembly Source File
|
1994-10-03
|
898b
|
39 lines
;
; The following code fragment shows some of the logic needed to
; read CMOS and check size of extended memory stored there.
;
cmp processor_type,0 ;check if 8088
je read_bios_ext ;jmp if 8088
mov dl,0 ;assume it is not a ps2
call checksum_cmos
cmp al,0 ;check if checksum ok
je good_AT_cmos ;jmp if cmos read ok
mov dl,1
call checksum_cmos
cmp al,0
jne read_bios_ext ;jmp if not ps2 or cmos bad
mov ax,3536h ;get ps2 info
jmp get_cmos_data
read_bios_ext:
mov ah,88h
int 15h
mov total_size_ext,ax
jmp device_check
;
; read size of extended memory from CMOS
;
good_AT_cmos:
mov ax,3031h ;get normal cmos parameters
get_cmos_data:
call read_cmos
xchg al,ah
call read_cmos
mov total_size_ext,ax
;
; check if another device driver has been installed for extended memory
; check for XMS, EMS, old VDISK's.
;
device_check: